<script setup>
import { inject } from 'vue'

const info = inject('toSon')
</script>

<template>
  <div class="app-page">子组件---{{ info }}</div>
</template>

<style scoped>
.app-page {
  width: 100px;
  height: 100px;
  background-color: #f00;
}
</style>
